package buisness_service;

import java.util.ArrayList;
import java.util.List;

import buisness_service.Rapport.Mois;

public class Finance_mois {

	private Depense_mois dep_mois;
	private Revenu_mois rev_mois;
	private Mois mois;
	private int index_finance_annee;
	private int index_finance_mois;
	private List<Finance_jour> finances_jour;

	public Finance_mois(Mois mois, Finance_annee f, User user) {
		this.mois = mois;
		this.finances_jour = new ArrayList<Finance_jour>();
		this.index_finance_annee = f.getIndex_annee();
		user.getRapport().get(this.index_finance_annee).getFinances_mois()
				.add(this);
		this.index_finance_mois = user.getRapport()
				.get(this.index_finance_annee).getFinances_mois().size() - 1;
		this.dep_mois = new Depense_mois(this, user);
		this.rev_mois = new Revenu_mois(this, user);
	}

	public Depense_mois getDep_mois() {
		return dep_mois;
	}

	public void setDep_mois(Depense_mois dep_mois) {
		this.dep_mois = dep_mois;
	}

	public Revenu_mois getRev_mois() {
		return rev_mois;
	}

	public void setRev_mois(Revenu_mois rev_mois) {
		this.rev_mois = rev_mois;
	}

	public Mois getMois() {
		return mois;
	}

	public void setMois(Mois mois) {
		this.mois = mois;
	}

	
	public int getIndexFinance_annee() {
		return index_finance_annee;
	}

	public void setIndexFinance_annee(int finance_annee) {
		this.index_finance_annee = finance_annee;
	}

	public int getIndex_finance_mois() {
		return index_finance_mois;
	}

	public void setIndex_finance_mois(int index_finance_mois) {
		this.index_finance_mois = index_finance_mois;
	}

	public List<Finance_jour> getFinances_jour() {
		return finances_jour;
	}

	public void setFinances_jour(List<Finance_jour> finances_jour) {
		this.finances_jour = finances_jour;
	}

}
